﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using BLL;
using DAL.Linq;

namespace InvoiceManagement.Controllers
{
    public class SYS_USERController
    {
        private static ISYS_USER_Dao Sys_UserController = DataAccess.SYS_USER_Dao;
        public SYS_USERController()
        { 
            //Sys_UserController.GetById
        }

        public SYS_USER GetById(int id)
        {
            return Sys_UserController.GetById(id);
            
        }

        public bool UpdatePassword(int userID, string oldPass, string newPass)
        {
            return Sys_UserController.UpdatePassword(userID, oldPass, newPass);
        }

        public bool Insert_Sys_Users(string userCode, string userName, string userPass, bool IsUse)
        {
            return Sys_UserController.Insert_Sys_Users(userCode, userName, userPass, IsUse);
        }

        public bool Update_Sys_Users(int userID, string userCode, string userName, string userPass, bool isUse)
        {
            return Sys_UserController.Update_Sys_Users(userID, userCode, userName, userPass, isUse);
        }

        public bool Delete_Sys_Users(int userID)
        {
            return Sys_UserController.Delete_Sys_Users(userID);
        }

        public IList<SYS_USER> GetAll_Users()
        {
            return Sys_UserController.GetAll_Users();
        }

        public SYS_USER GetLogin(string userCode, string userPass)
        {
            return Sys_UserController.GetLogin(userCode,userPass);
        }
    }
}
